package com.kk.base.dao.admin;

import com.kk.base.entity.admin.ProcessRecords;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProcessRecordsDao extends JpaRepository<ProcessRecords, Long>, JpaSpecificationExecutor<ProcessRecords> {

    @Query("select pr from ProcessRecords pr where pr.id = :id")
    ProcessRecords find(@Param("id")Long id);

    List<ProcessRecords> findByExpressMailOrder_Id(Long expressMailOrderId);

}
